package model;

/**
 * This interface has methods that are needed to be defined game state when a 
 * particular pattern of slots is detected in the grid.
 *
 */
public interface LadderGameListener
{
    /**
     * Called when a new game starts
     */
    public void onNewGame();

    /**
     * Called when the passed player tried to make an illegal Move to the passed
     * position
     * 
     * @param position
     * @param player
     */
    public void onIllegalMove(String position, Player player);

    /**
     * Called when an error happens
     * 
     * @param message
     *            the error message
     */
    public void onErrorOccured(String message);

    /**
     * Called when the passed player wins.
     * 
     * @param player
     */
    public void onPlayerWins(Player player);

    /**
     * Called when the game ends in a tie
     */
    public void onTie();

    /**
     * Called when the passed player finished playing his turn.
     * 
     * @param player
     * @param move the slot position on which the player just put a piece on (ex :
     *         "H1", "B2").
     */
    public void onPlayerTurnFinished(Player player, String move);
}
